package com.ruoyi.customer.service.impl;

import com.ruoyi.customer.domain.CustomerGroup;
import com.ruoyi.customer.mapper.CustomerGroupMapper;
import com.ruoyi.customer.service.ICustomerGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CustomerGroupServiceImpl implements ICustomerGroupService {

    private final CustomerGroupMapper customerGroupMapper;

    @Autowired
    public CustomerGroupServiceImpl(CustomerGroupMapper customerGroupMapper) {
        this.customerGroupMapper = customerGroupMapper;
    }

    @Override
    public List<CustomerGroup> selectCustomerGroupList(CustomerGroup group) {
        return customerGroupMapper.selectCustomerGroupList(group);
    }

    @Override
    public CustomerGroup selectCustomerGroupById(Long groupId) {
        return customerGroupMapper.selectCustomerGroupById(groupId);
    }

    @Override
    public int insertCustomerGroup(CustomerGroup group) {
        return customerGroupMapper.insertCustomerGroup(group);
    }

    @Override
    public int updateCustomerGroup(CustomerGroup group) {
        return customerGroupMapper.updateCustomerGroup(group);
    }

    @Override
    public int deleteCustomerGroupByIds(Long[] groupIds) {
        return customerGroupMapper.deleteCustomerGroupByIds(groupIds);
    }

    @Override
    public int deleteCustomerGroupById(Long groupId) {
        return customerGroupMapper.deleteCustomerGroupById(groupId);
    }
}
